Integrand size = 22, antiderivative size = 168 \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {\cos (a+b x)}{4 d (c+d x)}+\frac {\cos (3 a+3 b x)}{4 d (c+d x)}+\frac {3 b \operatorname {CosIntegral}\left (\frac {3 b c}{d}+3 b x\right ) \sin \left (3 a-\frac {3 b c}{d}\right )}{4 d^2}-\frac {b \operatorname {CosIntegral}\left (\frac {b c}{d}+b x\right ) \sin \left (a-\frac {b c}{d}\right )}{4 d^2}-\frac {b \cos \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{4 d^2}+\frac {3 b \cos \left (3 a-\frac {3 b c}{d}\right ) \text {Si}\left (\frac {3 b c}{d}+3 b x\right )}{4 d^2} \]
-1/4*cos(b*x+a)/d/(d*x+c)+1/4*cos(3*b*x+3*a)/d/(d*x+c)-1/4*b*cos(a-b*c/d)* Si(b*c/d+b*x)/d^2+3/4*b*cos(3*a-3*b*c/d)*Si(3*b*c/d+3*b*x)/d^2+3/4*b*Ci(3* b*c/d+3*b*x)*sin(3*a-3*b*c/d)/d^2-1/4*b*Ci(b*c/d+b*x)*sin(a-b*c/d)/d^2
Time = 1.64 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.83 \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {\frac {d \cos (a+b x)}{c+d x}-\frac {d \cos (3 (a+b x))}{c+d x}-3 b \operatorname {CosIntegral}\left (\frac {3 b (c+d x)}{d}\right ) \sin \left (3 a-\frac {3 b c}{d}\right )+b \operatorname {CosIntegral}\left (b \left (\frac {c}{d}+x\right )\right ) \sin \left (a-\frac {b c}{d}\right )+b \cos \left (a-\frac {b c}{d}\right ) \text {Si}\left (b \left (\frac {c}{d}+x\right )\right )-3 b \cos \left (3 a-\frac {3 b c}{d}\right ) \text {Si}\left (\frac {3 b (c+d x)}{d}\right )}{4 d^2} \]
-1/4*((d*Cos[a + b*x])/(c + d*x) - (d*Cos[3*(a + b*x)])/(c + d*x) - 3*b*Co sIntegral[(3*b*(c + d*x))/d]*Sin[3*a - (3*b*c)/d] + b*CosIntegral[b*(c/d + x)]*Sin[a - (b*c)/d] + b*Cos[a - (b*c)/d]*SinIntegral[b*(c/d + x)] - 3*b* Cos[3*a - (3*b*c)/d]*SinIntegral[(3*b*(c + d*x))/d])/d^2
Time = 0.49 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4906, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^2(a+b x) \cos (a+b x)}{(c+d x)^2} \, dx\) |
\(\Big \downarrow \) 4906 |
\(\displaystyle \int \left (\frac {\cos (a+b x)}{4 (c+d x)^2}-\frac {\cos (3 a+3 b x)}{4 (c+d x)^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 b \sin \left (3 a-\frac {3 b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {3 b c}{d}+3 b x\right )}{4 d^2}-\frac {b \sin \left (a-\frac {b c}{d}\right ) \operatorname {CosIntegral}\left (\frac {b c}{d}+b x\right )}{4 d^2}-\frac {b \cos \left (a-\frac {b c}{d}\right ) \text {Si}\left (\frac {b c}{d}+b x\right )}{4 d^2}+\frac {3 b \cos \left (3 a-\frac {3 b c}{d}\right ) \text {Si}\left (\frac {3 b c}{d}+3 b x\right )}{4 d^2}-\frac {\cos (a+b x)}{4 d (c+d x)}+\frac {\cos (3 a+3 b x)}{4 d (c+d x)}\) |
-1/4*Cos[a + b*x]/(d*(c + d*x)) + Cos[3*a + 3*b*x]/(4*d*(c + d*x)) + (3*b* CosIntegral[(3*b*c)/d + 3*b*x]*Sin[3*a - (3*b*c)/d])/(4*d^2) - (b*CosInteg ral[(b*c)/d + b*x]*Sin[a - (b*c)/d])/(4*d^2) - (b*Cos[a - (b*c)/d]*SinInte gral[(b*c)/d + b*x])/(4*d^2) + (3*b*Cos[3*a - (3*b*c)/d]*SinIntegral[(3*b* c)/d + 3*b*x])/(4*d^2)
3.1.19.3.1 Defintions of rubi rules used
Int[Cos[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b _.)*(x_)]^(n_.), x_Symbol] :> Int[ExpandTrigReduce[(c + d*x)^m, Sin[a + b*x ]^n*Cos[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IG tQ[p, 0]
Time = 0.58 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.47
method | result | size |
derivativedivides | \(\frac {\frac {b^{2} \left (-\frac {\cos \left (x b +a \right )}{\left (-a d +c b +d \left (x b +a \right )\right ) d}-\frac {-\frac {\operatorname {Si}\left (-x b -a -\frac {-a d +c b}{d}\right ) \cos \left (\frac {-a d +c b}{d}\right )}{d}-\frac {\operatorname {Ci}\left (x b +a +\frac {-a d +c b}{d}\right ) \sin \left (\frac {-a d +c b}{d}\right )}{d}}{d}\right )}{4}-\frac {b^{2} \left (-\frac {3 \cos \left (3 x b +3 a \right )}{\left (-a d +c b +d \left (x b +a \right )\right ) d}-\frac {3 \left (-\frac {3 \,\operatorname {Si}\left (-3 x b -3 a -\frac {3 \left (-a d +c b \right )}{d}\right ) \cos \left (\frac {-3 a d +3 c b}{d}\right )}{d}-\frac {3 \,\operatorname {Ci}\left (3 x b +3 a +\frac {-3 a d +3 c b}{d}\right ) \sin \left (\frac {-3 a d +3 c b}{d}\right )}{d}\right )}{d}\right )}{12}}{b}\) | \(247\) |
default | \(\frac {\frac {b^{2} \left (-\frac {\cos \left (x b +a \right )}{\left (-a d +c b +d \left (x b +a \right )\right ) d}-\frac {-\frac {\operatorname {Si}\left (-x b -a -\frac {-a d +c b}{d}\right ) \cos \left (\frac {-a d +c b}{d}\right )}{d}-\frac {\operatorname {Ci}\left (x b +a +\frac {-a d +c b}{d}\right ) \sin \left (\frac {-a d +c b}{d}\right )}{d}}{d}\right )}{4}-\frac {b^{2} \left (-\frac {3 \cos \left (3 x b +3 a \right )}{\left (-a d +c b +d \left (x b +a \right )\right ) d}-\frac {3 \left (-\frac {3 \,\operatorname {Si}\left (-3 x b -3 a -\frac {3 \left (-a d +c b \right )}{d}\right ) \cos \left (\frac {-3 a d +3 c b}{d}\right )}{d}-\frac {3 \,\operatorname {Ci}\left (3 x b +3 a +\frac {-3 a d +3 c b}{d}\right ) \sin \left (\frac {-3 a d +3 c b}{d}\right )}{d}\right )}{d}\right )}{12}}{b}\) | \(247\) |
risch | \(-\frac {3 i b \,{\mathrm e}^{-\frac {3 i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (3 i b x +3 i a -\frac {3 i \left (a d -c b \right )}{d}\right )}{8 d^{2}}+\frac {i b \,{\mathrm e}^{-\frac {i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (i b x +i a -\frac {i \left (a d -c b \right )}{d}\right )}{8 d^{2}}-\frac {i b \,{\mathrm e}^{\frac {i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (-i b x -i a -\frac {-i a d +i c b}{d}\right )}{8 d^{2}}+\frac {3 i b \,{\mathrm e}^{\frac {3 i \left (a d -c b \right )}{d}} \operatorname {Ei}_{1}\left (-3 i b x -3 i a -\frac {3 \left (-i a d +i c b \right )}{d}\right )}{8 d^{2}}-\frac {\left (-2 d x b -2 c b \right ) \cos \left (x b +a \right )}{8 d \left (d x +c \right ) \left (-d x b -c b \right )}+\frac {\left (-2 d x b -2 c b \right ) \cos \left (3 x b +3 a \right )}{8 d \left (d x +c \right ) \left (-d x b -c b \right )}\) | \(281\) |
1/b*(1/4*b^2*(-cos(b*x+a)/(-a*d+c*b+d*(b*x+a))/d-(-Si(-x*b-a-(-a*d+b*c)/d) *cos((-a*d+b*c)/d)/d-Ci(x*b+a+(-a*d+b*c)/d)*sin((-a*d+b*c)/d)/d)/d)-1/12*b ^2*(-3*cos(3*b*x+3*a)/(-a*d+c*b+d*(b*x+a))/d-3*(-3*Si(-3*x*b-3*a-3*(-a*d+b *c)/d)*cos(3*(-a*d+b*c)/d)/d-3*Ci(3*x*b+3*a+3*(-a*d+b*c)/d)*sin(3*(-a*d+b* c)/d)/d)/d))
Time = 0.25 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.11 \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=\frac {4 \, d \cos \left (b x + a\right )^{3} - {\left (b d x + b c\right )} \operatorname {Ci}\left (\frac {b d x + b c}{d}\right ) \sin \left (-\frac {b c - a d}{d}\right ) + 3 \, {\left (b d x + b c\right )} \operatorname {Ci}\left (\frac {3 \, {\left (b d x + b c\right )}}{d}\right ) \sin \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) + 3 \, {\left (b d x + b c\right )} \cos \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) \operatorname {Si}\left (\frac {3 \, {\left (b d x + b c\right )}}{d}\right ) - {\left (b d x + b c\right )} \cos \left (-\frac {b c - a d}{d}\right ) \operatorname {Si}\left (\frac {b d x + b c}{d}\right ) - 4 \, d \cos \left (b x + a\right )}{4 \, {\left (d^{3} x + c d^{2}\right )}} \]
1/4*(4*d*cos(b*x + a)^3 - (b*d*x + b*c)*cos_integral((b*d*x + b*c)/d)*sin( -(b*c - a*d)/d) + 3*(b*d*x + b*c)*cos_integral(3*(b*d*x + b*c)/d)*sin(-3*( b*c - a*d)/d) + 3*(b*d*x + b*c)*cos(-3*(b*c - a*d)/d)*sin_integral(3*(b*d* x + b*c)/d) - (b*d*x + b*c)*cos(-(b*c - a*d)/d)*sin_integral((b*d*x + b*c) /d) - 4*d*cos(b*x + a))/(d^3*x + c*d^2)
\[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=\int \frac {\sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{\left (c + d x\right )^{2}}\, dx \]
Result contains complex when optimal does not.
Time = 0.35 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.82 \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=-\frac {b^{2} {\left (E_{2}\left (\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right ) + E_{2}\left (-\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \cos \left (-\frac {b c - a d}{d}\right ) - b^{2} {\left (E_{2}\left (\frac {3 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right ) + E_{2}\left (-\frac {3 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right )\right )} \cos \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right ) - b^{2} {\left (i \, E_{2}\left (\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right ) - i \, E_{2}\left (-\frac {i \, b c + i \, {\left (b x + a\right )} d - i \, a d}{d}\right )\right )} \sin \left (-\frac {b c - a d}{d}\right ) - b^{2} {\left (i \, E_{2}\left (\frac {3 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right ) - i \, E_{2}\left (-\frac {3 \, {\left (-i \, b c - i \, {\left (b x + a\right )} d + i \, a d\right )}}{d}\right )\right )} \sin \left (-\frac {3 \, {\left (b c - a d\right )}}{d}\right )}{8 \, {\left (b c d + {\left (b x + a\right )} d^{2} - a d^{2}\right )} b} \]
-1/8*(b^2*(exp_integral_e(2, (I*b*c + I*(b*x + a)*d - I*a*d)/d) + exp_inte gral_e(2, -(I*b*c + I*(b*x + a)*d - I*a*d)/d))*cos(-(b*c - a*d)/d) - b^2*( exp_integral_e(2, 3*(-I*b*c - I*(b*x + a)*d + I*a*d)/d) + exp_integral_e(2 , -3*(-I*b*c - I*(b*x + a)*d + I*a*d)/d))*cos(-3*(b*c - a*d)/d) - b^2*(I*e xp_integral_e(2, (I*b*c + I*(b*x + a)*d - I*a*d)/d) - I*exp_integral_e(2, -(I*b*c + I*(b*x + a)*d - I*a*d)/d))*sin(-(b*c - a*d)/d) - b^2*(I*exp_inte gral_e(2, 3*(-I*b*c - I*(b*x + a)*d + I*a*d)/d) - I*exp_integral_e(2, -3*( -I*b*c - I*(b*x + a)*d + I*a*d)/d))*sin(-3*(b*c - a*d)/d))/((b*c*d + (b*x + a)*d^2 - a*d^2)*b)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 2.41 (sec) , antiderivative size = 67350, normalized size of antiderivative = 400.89 \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=\text {Too large to display} \]
1/8*(3*b*d*x*imag_part(cos_integral(3*b*x + 3*b*c/d))*tan(3/2*b*x)^2*tan(1 /2*b*x)^2*tan(3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d)^2 - b* d*x*imag_part(cos_integral(b*x + b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan (3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d)^2 + b*d*x*imag_part (cos_integral(-b*x - b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2*ta n(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d)^2 - 3*b*d*x*imag_part(cos_integ ral(-3*b*x - 3*b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2*tan(1/2* a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d)^2 + 6*b*d*x*sin_integral(3*(b*d*x + b *c)/d)*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c /d)^2*tan(1/2*b*c/d)^2 - 2*b*d*x*sin_integral((b*d*x + b*c)/d)*tan(3/2*b*x )^2*tan(1/2*b*x)^2*tan(3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/ d)^2 - 2*b*d*x*real_part(cos_integral(b*x + b*c/d))*tan(3/2*b*x)^2*tan(1/2 *b*x)^2*tan(3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d) - 2*b*d* x*real_part(cos_integral(-b*x - b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan( 3/2*a)^2*tan(1/2*a)^2*tan(3/2*b*c/d)^2*tan(1/2*b*c/d) + 6*b*d*x*real_part( cos_integral(3*b*x + 3*b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2* tan(1/2*a)^2*tan(3/2*b*c/d)*tan(1/2*b*c/d)^2 + 6*b*d*x*real_part(cos_integ ral(-3*b*x - 3*b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2*tan(1/2* a)^2*tan(3/2*b*c/d)*tan(1/2*b*c/d)^2 + 2*b*d*x*real_part(cos_integral(b*x + b*c/d))*tan(3/2*b*x)^2*tan(1/2*b*x)^2*tan(3/2*a)^2*tan(1/2*a)*tan(3/2...
Timed out. \[ \int \frac {\cos (a+b x) \sin ^2(a+b x)}{(c+d x)^2} \, dx=\int \frac {\cos \left (a+b\,x\right )\,{\sin \left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2} \,d x \]